var systemMessage={
    init:function(){
        var self=this;
        self.shadeDiv = $("#shade-div");
        self.bindEvents();
    },
    bindEvents:function(){
        var self=this;
        //        发送新系统消息
        $(".sendNews").click(function(){
            self.shadeDiv.show();
            $('#sendNews').setPosition().show();

        })
        $(".qun").textClean();
        $(".qun1").limitWord(50,"qun1");
        $(".qun2").limitWord(200,"qun2")
        $(".radio").click(function(){
            self.shadeDiv.show();
            $('#radio').setPosition().show();

        })
//删除
        $(".delete").click(function(){
            self.shadeDiv.show();
            $('#warning').setPosition().show().find("p.center").html("确定要删除这条消息吗？");

        })

    },
    ajaxGET:function (url, data, fn,beforeSendFn) {
        var beforeSendFn = beforeSendFn || function(){};
        $.ajax({type:"GET", dataType:'json', context:this, url:url, data:data, success:fn, beforeSend:beforeSendFn});
    },
    ajaxPOST:function (url, data, fn,beforeSendFn) {
        var beforeSendFn = beforeSendFn || function(){};
        $.ajax({type:"POST", dataType:'json', context:this, url:url, data:data, success:fn, beforeSend:beforeSendFn});
    }
}
$(function(){
    systemMessage.init()
})